UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'YEMU/6BfyEijVPhRRwcG6kO5HjL7Zo7qu+LlTUl2uLM='
WHERE
key_id = 'c1ef03238ff336c6e83b4c80c76d5e233a5abe8246a82bd233bc529ecd66349d'
AND (
token = 'YEMU/6BfyEijVPhRRwcG6kO5HjL7Zo7qu+LlTUl2uLM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)