UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'YJh9bq1HX2d3pyBZzgWaZsuLkEETEoY+W+I5rGEi/pI='
WHERE
key_id = '928f86948d0786bb1d949167b8517c2a3ebaf4082a85600b21f63567e00daf0a'
AND (
token = 'YJh9bq1HX2d3pyBZzgWaZsuLkEETEoY+W+I5rGEi/pI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)