UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '+l3eXkuQQCRySMt72qJ7tdMSDbQP6hHtNILUtyrrk7I=' 
WHERE 
  key_id = 'fc72cc555fe6eec6ffb91f54f3090c361de5f9aa401bd0222cfa802cd41d58e3' 
  AND (
    token = '+l3eXkuQQCRySMt72qJ7tdMSDbQP6hHtNILUtyrrk7I=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00036