UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/Ta9wMzmGB7JIlLSVpdK3Ks+EE2yYYHiOKXyAlQtQGQ=' 
WHERE 
  key_id = 'd432e397086f12485634e438cd6dfac0ebc0cfdfb69710fcf71f63235a1f3ff3' 
  AND (
    token = '/Ta9wMzmGB7JIlLSVpdK3Ks+EE2yYYHiOKXyAlQtQGQ=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00016