UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '+MK2CCJLuSr26oKpMi1MR1rbTEeC9sIzUlcyubEJpNM=' 
WHERE 
  key_id = 'c8a51191c349b2adfe8b180897440d56a69a796618f40143b2e500a5b9b6beac' 
  AND (
    token = '+MK2CCJLuSr26oKpMi1MR1rbTEeC9sIzUlcyubEJpNM=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00029