UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'EKaw/9GkAIB05IFun7mY9xPzsk1RpVQsNU4Vht1Xqq0=' 
WHERE 
  key_id = '91957f5f3397966bebafe8f9fed05c4601cf524c87a484e0247600fb163a1433' 
  AND (
    token = 'EKaw/9GkAIB05IFun7mY9xPzsk1RpVQsNU4Vht1Xqq0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00036