UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/IaCBVd66ZZgKRHYWxaZGbz9G8PfDw3mgEdQ773RN3w=' 
WHERE 
  key_id = '3af8b60275e3c294b96e4a53a882b26eb49d4285933a6a10b04e3f1641398382' 
  AND (
    token = '/IaCBVd66ZZgKRHYWxaZGbz9G8PfDw3mgEdQ773RN3w=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00027