UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '3L+5h9S2+FMUbvc9VPp5sYXua0nSVYP4XjBvbr/KrwY=' 
WHERE 
  key_id = '96869cb809c8a6d12902b15ed1fc191785bb7722ab2d4a761a5844cef1ac49ab' 
  AND (
    token = '3L+5h9S2+FMUbvc9VPp5sYXua0nSVYP4XjBvbr/KrwY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00045