UPDATE
cscart_multi_declock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '8BIOrlghhaVe/s6qGoJ1Z5jth3Lv35Un72PqPkQn/+w='
WHERE
key_id = '546b87dc3571aba27b79f069172b435507aaebdb87354df6b0c3e5f6fafb5166'
AND (
token = '8BIOrlghhaVe/s6qGoJ1Z5jth3Lv35Un72PqPkQn/+w='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)