UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '6kjVTL97qdmyZtEzvtb70XgOX7BRXWr5fsMxwOtbzNM=' 
WHERE 
  key_id = '1cc620b4faa78d9ca2c69395114da690f031d8b01ce4ad4c79111cba58a1dfd5' 
  AND (
    token = '6kjVTL97qdmyZtEzvtb70XgOX7BRXWr5fsMxwOtbzNM=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00289