UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Gign3146itxEQkSaRkb9ZCBwYuJ5POYg3NVI/8NJTS0=' 
WHERE 
  key_id = '71ab530f932adcc25ece4b4189bd5955a1d99f72919005dd1e5c309509356c4e' 
  AND (
    token = 'Gign3146itxEQkSaRkb9ZCBwYuJ5POYg3NVI/8NJTS0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031