UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'rmzGgGWiXlQn8W21t3IjNGDhDuNIQ1sG/Z7DIcQQfGs='
WHERE
key_id = '27d5129bdb197274a0fa87ccf916f7da88a073597dc9309773113c30a37481e0'
AND (
token = 'rmzGgGWiXlQn8W21t3IjNGDhDuNIQ1sG/Z7DIcQQfGs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)