UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'M5INJU/+TybhkO+u54QIn2zshE/62XQr0xgLlXSbscA='
WHERE
key_id = '516c8b3d49ecd66f17e4325d31ed60af1f384bdf30b5c748af6298b6f46f5753'
AND (
token = 'M5INJU/+TybhkO+u54QIn2zshE/62XQr0xgLlXSbscA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)