UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'CQ+gzXWgxeP1IleY2P9Ht8JgJ6C61+AWoU8Kj3HFHGY=' 
WHERE 
  key_id = 'b8e1a1e6afb86f4fd95f0e89fd6ead750925e45af718f60ac98cb85c430a0544' 
  AND (
    token = 'CQ+gzXWgxeP1IleY2P9Ht8JgJ6C61+AWoU8Kj3HFHGY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00020