UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'IMBLk3Azkw2FdvvJ8XK/IYIWO6OW7V2UHoye1Aa9sCE='
WHERE
key_id = '488bf39d13ef566412faedcf02f922c49e1e566e3fc8ee1518d71dbe9e0d3b22'
AND (
token = 'IMBLk3Azkw2FdvvJ8XK/IYIWO6OW7V2UHoye1Aa9sCE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)