UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'WvmbO2A8E0f73sATzQqgvdavVjH7LgRXsTCqga0aW6o='
WHERE
key_id = '4885295f22e7253dd5be305eaa2eefe1a437df95dc944cb28b770c22da1a5e99'
AND (
token = 'WvmbO2A8E0f73sATzQqgvdavVjH7LgRXsTCqga0aW6o='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)