UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'fT0wOOsXEClwO6DzjvQNkiXswd/tFq1FtpHSHSyhQzE='
WHERE
key_id = '1f10e26ab544b3007f00a9d31474f01117e2cc9b67348fbb3df8b12c7ff21857'
AND (
token = 'fT0wOOsXEClwO6DzjvQNkiXswd/tFq1FtpHSHSyhQzE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)