UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '+4rRzlSbMV4CxfbZxaF7qPZqncJiUM08LPvQyQWe7W0=' 
WHERE 
  key_id = '1ac1ab1e09106b363e8f54082187bc860838034f096b996631329eb9516b28da' 
  AND (
    token = '+4rRzlSbMV4CxfbZxaF7qPZqncJiUM08LPvQyQWe7W0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00049