UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'vFCO92LtAIzrClwbG6koHdkTPfdVq8tDpD55FygKcKU='
WHERE
key_id = '5eed4fd49884a8a2137ab0e7cbba25328961f9a78c8562ced8fda6acf8d364cb'
AND (
token = 'vFCO92LtAIzrClwbG6koHdkTPfdVq8tDpD55FygKcKU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)