UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'MZLbhkzHqSMN/zens43UTWgrJsZBA0W3OnEwCALU0/w=' 
WHERE 
  key_id = '2ec68119aad85202f8f16c04324bda4608aff977569f2df3ede7bca7c19a2186' 
  AND (
    token = 'MZLbhkzHqSMN/zens43UTWgrJsZBA0W3OnEwCALU0/w=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033