UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'N+kAnxoPR5FZHBTpTe3S2f6OG4wiz1IFp/UGvSvTF/Q=' 
WHERE 
  key_id = '3898f5d7b79e952ea13ac6de5383cc058cd9d31537aaaad07f859029d241aaa1' 
  AND (
    token = 'N+kAnxoPR5FZHBTpTe3S2f6OG4wiz1IFp/UGvSvTF/Q=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00024