UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'f5DWI+aYIo5pO2+raTA/WhqPVJgvLUVimEevy2KLDg4='
WHERE
key_id = '5ea53c3aed78d27588eacd81aea2c60d366ffb83f4b4fee3b10cc428bdea60db'
AND (
token = 'f5DWI+aYIo5pO2+raTA/WhqPVJgvLUVimEevy2KLDg4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)