UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'xJGjMN2cQJOwDgLyCQiaxmF3sLiZPI+q4RGsyS/JUuA=' 
WHERE 
  key_id = '553bbc18cfb7c459bbda23582990a6f8c7a3d0e7e5b8bd7817a1d83de591df27' 
  AND (
    token = 'xJGjMN2cQJOwDgLyCQiaxmF3sLiZPI+q4RGsyS/JUuA=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00034