UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'vitULHXxerRg9sqRziNIX3ddZD9aZA39CkEoQ8uQicg='
WHERE
key_id = '07910eb467565cf3a4c0f2b89057a671dd91dbbc54be1d3c9b21bfc53ab3f1bc'
AND (
token = 'vitULHXxerRg9sqRziNIX3ddZD9aZA39CkEoQ8uQicg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)