UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'zxSxGGRJCqcv1J0i9OjMv5rvPBiVtR7BFgLuCg7ZHPo=' 
WHERE 
  key_id = 'ff6d0b8b848d3dceedeb25c895f5bcb05569517cf6265da8f5c1104d5ba83157' 
  AND (
    token = 'zxSxGGRJCqcv1J0i9OjMv5rvPBiVtR7BFgLuCg7ZHPo=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00026