UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'QSoPTmfdxJpMaDS8AvceE/Z/e1BMpJ2aRhDVECXKWuA='
WHERE
key_id = '26e7870350e2576c2f3d2506b354a33c19f9dde197c8146441458fd3743603aa'
AND (
token = 'QSoPTmfdxJpMaDS8AvceE/Z/e1BMpJ2aRhDVECXKWuA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)