UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Z5MWin1GfNGoOPeL6c2JZSFtVeFgPUOrlI+rEOyzbXI='
WHERE
key_id = '426689e7f87a68ddb9ad1cf53d052fe25861577e5b6175e32e58311f667b25a9'
AND (
token = 'Z5MWin1GfNGoOPeL6c2JZSFtVeFgPUOrlI+rEOyzbXI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)