UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'CVwF1Xvcz8ewP1f6pJaqd0pKUYI6a8vuEFch3nsE3d0='
WHERE
key_id = '549662b07e364552c61b9fd743f8225627a3344b82b7c50dafc90aa5106b54fb'
AND (
token = 'CVwF1Xvcz8ewP1f6pJaqd0pKUYI6a8vuEFch3nsE3d0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)