UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/kaOyteBcJ9uqSz7+waiDtAOvcVFRwXDY+EUk1am4NI=' 
WHERE 
  key_id = 'bbda5446111cf8c442a17ceca53e1ae95984b0672ceadbef183825a6646e9fa2' 
  AND (
    token = '/kaOyteBcJ9uqSz7+waiDtAOvcVFRwXDY+EUk1am4NI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00029