UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Ra2BTWFrMrO017wgD+g0L4ALbQ+O+KOqZZ0e/D1guEM='
WHERE
key_id = '8a5f057d21026ba4bb70978f8c156c908bedef9f1e03222924a42ff297acb9e6'
AND (
token = 'Ra2BTWFrMrO017wgD+g0L4ALbQ+O+KOqZZ0e/D1guEM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)