UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'czM3JrT+soTigsx6/Tl8WxmcIaNWinxsR0dd2QqsrJw=' 
WHERE 
  key_id = '4e3112399edb50da9a2cb08ef208ca39f7220782092e1d61473a7880f3fd9422' 
  AND (
    token = 'czM3JrT+soTigsx6/Tl8WxmcIaNWinxsR0dd2QqsrJw=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00035