UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'uh29oLNs2O7O8KIejL/aMeB0LhTHWwchUJJaqP0mPdw=' 
WHERE 
  key_id = '011f5ee8bd166467d8bd55a5d2f250f7c884d49d9943f0ef2164c038eb4a5e86' 
  AND (
    token = 'uh29oLNs2O7O8KIejL/aMeB0LhTHWwchUJJaqP0mPdw=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00030