UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '9WLapykYrNTgBxT5bunr1lQOKYw0KhSDvAIfnrtmp/0='
WHERE
key_id = '263df520c4ea272f92a832e4e52a34d85942d3685e829c609c0bd6a1ed3f1f58'
AND (
token = '9WLapykYrNTgBxT5bunr1lQOKYw0KhSDvAIfnrtmp/0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)