UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'iZZwRvBIT9PJ+C2YQQGnyE3+8bVOpaHPmPoXnwI8mG0=' 
WHERE 
  key_id = '73696ae41adb5940cb11e55871672375e8e97307dcad0cb0b4e56e724b34fe4f' 
  AND (
    token = 'iZZwRvBIT9PJ+C2YQQGnyE3+8bVOpaHPmPoXnwI8mG0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00029