UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Itx0jAPUmJ6/1Mc8K1TGuXAdYi92rlmtdQ3SpFe0Ykc='
WHERE
key_id = 'c933dca32e52cde77d72d90faba8c0d872f9e47427a8a2cc97f31f9bbe3836f1'
AND (
token = 'Itx0jAPUmJ6/1Mc8K1TGuXAdYi92rlmtdQ3SpFe0Ykc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)