UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'sJzBsHDCUsDa7IiIhS5+T0EZ4qjeAvScNRDYQCrKJxI='
WHERE
key_id = '53db396ef3289e866d296f7aecd0f2f9470a03ea72449aebd792049fdf7393b5'
AND (
token = 'sJzBsHDCUsDa7IiIhS5+T0EZ4qjeAvScNRDYQCrKJxI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)