UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '42oYkZxVqH9uAcD8XYDLCVbkBrR+Urac5uxlOXJFCTY=' 
WHERE 
  key_id = '8e66258a547c9a28e5f938b3bcc8708ddb6e48cf4cc097beae2a2db870de843a' 
  AND (
    token = '42oYkZxVqH9uAcD8XYDLCVbkBrR+Urac5uxlOXJFCTY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00028