UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'MQGEwMsiFbUfc8DoWZd9nogPBoDKyXe1sJYRYtSkHMY=' 
WHERE 
  key_id = '72f6178fb3cbb5c315ef8da9a0c55edcedc69741d08543f68a261fb032a1cb32' 
  AND (
    token = 'MQGEwMsiFbUfc8DoWZd9nogPBoDKyXe1sJYRYtSkHMY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033