UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'WTZU/FszMNCR9vM/1EJSwSS9vNECn85wwj/mQqEK1WU='
WHERE
key_id = '34a1d1c2d4a7fdc9ac07c862025bb4f450872838dff819428c92569d7a6412d8'
AND (
token = 'WTZU/FszMNCR9vM/1EJSwSS9vNECn85wwj/mQqEK1WU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)