UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'nLNJMpvFK/9alAkWB35/BThNMxCCME3N8BJVK3EyUhQ='
WHERE
key_id = '68c2e50bedd645e00fbd4b4fc0c9fbc93db54034978d7642dece20755e8db72f'
AND (
token = 'nLNJMpvFK/9alAkWB35/BThNMxCCME3N8BJVK3EyUhQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)