UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'ORPj38CYhB8cg3EAtz5bFb2hc/3VBHlvublYcmbpqLA=' 
WHERE 
  key_id = 'def26d6381cf433aeccf8ccba3380c5732cefc193650f9ed12f3d3582418e9e3' 
  AND (
    token = 'ORPj38CYhB8cg3EAtz5bFb2hc/3VBHlvublYcmbpqLA=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031