UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '4HWGU4+ehG4CnLRXRlTcmJwL16H9b673U+0oSXEOTmw='
WHERE
key_id = 'eed13586fbd74ed45ee5da3af12c8c2178ff2b1a789335373894f2859cdc93a9'
AND (
token = '4HWGU4+ehG4CnLRXRlTcmJwL16H9b673U+0oSXEOTmw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)