UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'r1ActxwgAtXIuIO4Tp2g4rDCI6STY2TOUDFHJDJqAzE='
WHERE
key_id = '98369193b66de2dba986ccb64d36db8fc3c2b1a86ac368addb54a6e4cb207b47'
AND (
token = 'r1ActxwgAtXIuIO4Tp2g4rDCI6STY2TOUDFHJDJqAzE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)