UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'DVPXBxqr4lHedU/GeeL+7ZSPG08HZk0vqyK/acBwPP8='
WHERE
key_id = '30640d89b1333c8b4db736eb99c51ad36f1fa125777e7adb66a2196330c6030b'
AND (
token = 'DVPXBxqr4lHedU/GeeL+7ZSPG08HZk0vqyK/acBwPP8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)