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

Query time 0.00028