UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'tbGjk1HUaqU/Y/+nmHTAIn5ZYjgr0Mtnnp36XgXQg/E='
WHERE
key_id = '32af6ee615fccea883f32abd8b16747299bfd23743727ddebf9fd4d6a65124ad'
AND (
token = 'tbGjk1HUaqU/Y/+nmHTAIn5ZYjgr0Mtnnp36XgXQg/E='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)